import React, { Component } from 'react'
import { Route, Redirect, NavLink, Switch } from "react-router-dom"
import Movie from './movie'
import Video from './video'
import Smallvideo from './smallvideo'
import Header from '../components/header'
import Show from './show'
import RouterView from '../router/routerView'
import { NavBar } from 'react-vant';
import {Tabbar} from "react-vant"
// 这个页面用来承接二级路由
class All extends Component {
  render() {
    console.log(this.props.child, 77777777777777);
    return (
      <>
        <Header></Header>
        {/* <RoutervIEW></RoutervIEW> */}
        {/* <Route path="/all/movie" component={Movie}></Route>
               <Route path="/all/video" component={Video}></Route>
               <Route path="/all/smallvideo" component={Smallvideo}></Route>
               <Route path="/all/show" component={Show}></Route> 
               <Redirect to="/all/movie" from="/all"></Redirect> */}
       
        <RouterView RouterList={this.props.child}></RouterView>

        <Tabbar>
          {
            this.props.title && this.props.title.length ? this.props.title.map((item, index) => {
              return <Tabbar.Item icon={item.icon} key={index}>
                <NavLink to={item.path}> {item.title}</NavLink>
              </Tabbar.Item>
            }) : "暂无数据"
          }
          {/* <Tabbar.Item icon="search">
                <NavLink to="/all/video">视频</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon="friends-o">
                <NavLink to="/all/smallvideo"> 小视频</NavLink>
                </Tabbar.Item>
                <Tabbar.Item icon="setting-o">
                    <NavLink to="/all/show"> 演出</NavLink> 
                </Tabbar.Item>
                <Tabbar.Item icon="shopping-cart-o">
                    <NavLink to="/my">我的</NavLink>
                </Tabbar.Item> */}
        </Tabbar>


      </>
    )
  }
}

export default All